package com.zhiche.lisa.bms.scheduled;

import com.zhiche.lisa.bms.service.statistics.StaticOrderCompositeService;
import com.zhiche.lisa.bms.service.statistics.StaticWaybillCompositeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author Nicky
 * @since 2019/2/18
 */
@Component
public class GetStaticDataScheduled {

    private final Logger LOGGER = LoggerFactory.getLogger(GetStaticDataScheduled.class);

    @Autowired
    private StaticOrderCompositeService staticOrderCompositeService;

    @Autowired
    private StaticWaybillCompositeService staticWaybillCompositeService;


    // /**
    //  * 每天6点钟执行
    //  */
    // @Scheduled(cron = "0 0 6 * * *")
    // public void getStaticistData() {
    //     LOGGER.info("BMS -->getStaticistData  start");
    //     try {
    //         staticOrderCompositeService.insertOrderComposite();
    //         staticWaybillCompositeService.insertWaybillComposite();
    //     } catch (Exception e) {
    //         LOGGER.error("BMS -->getStaticistData  Error: {}", e.getMessage());
    //     }
    //     LOGGER.info("BMS -->getStaticistData  end");
    // }
}
